﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace StoreWeb.system.storeTopMD
{
    public partial class edit : System.Web.UI.Page
    {
        //BLL.Role role = new BLL.Role();
        Maticsoft.BLL.UserAdmin userbll = new Maticsoft.BLL.UserAdmin();
        BLL.DealersManage userdealers = new BLL.DealersManage();
        Maticsoft.BLL.UserAdmin user = new Maticsoft.BLL.UserAdmin();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //Bind();
                hidid.Value = Request.QueryString["id"];
                //if (!string.IsNullOrEmpty(hidid.Value))
                //{
                //    Maticsoft.Model.UserAdmin ne = userbll.GetModel(Convert.ToInt32(hidid.Value));
 

                //    dealers.Value = ne.dealersid;
                //    if (ne.dealersid != "0")
                //    {
                //        selsectdealers.Value = userdealers.GetModel(Convert.ToInt32(ne.dealersid)).username + "【" + userdealers.GetModel(Convert.ToInt32(ne.dealersid)).dealersgrade + "级】";
                //    }
                   
                //}
                String dealersid = user.GetModel(Convert.ToInt32(Request.Cookies["UserLogin"].Values[0])).dealersid;//经销商ID
                dealers.Value = dealersid;
            }
        }

        //private void Bind()
        //{
        //    Maticsoft.BLL.Role message = new Maticsoft.BLL.Role();
        //    //加载角色
        //    ddlrole.DataSource = message.GetList(" ");
        //    ddlrole.DataTextField = "rolename";
        //    ddlrole.DataValueField = "id";
        //    ddlrole.DataBind();
        //    ddlrole.Items.Insert(0, new ListItem { Value = "", Text = "------请选择角色------" });

        //}
    }
}